package com.jd.finance.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jd.finance.core.pojo.dto.BankMoneyDTO;
import com.jd.finance.core.pojo.dto.LoanProductDTO;
import com.jd.finance.core.pojo.dto.ProductDealNumberByCityDTO;
import com.jd.finance.core.pojo.entity.Bank;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 银行表 Mapper 接口
 * </p>
 *
 * @author LiQingBo
 * @since 2022-05-17
 */
@Mapper
public interface BankMapper extends BaseMapper<Bank> {


    /**
     * 根据银行id查询可贷款产品
     * @param bid
     * @return
     */
    List<LoanProductDTO> selectLoanProductInfo(Integer bid);


    List<Bank> selectLoadBank(String city);


    /**
     * 获取各银行当月贷款总金额
     * @param uid
     * @return
     */
    List<BankMoneyDTO> selectBankMoney(@Param("uid") Integer uid);

    /**
     * 根据地区名称，获取全年该地区贷款产品成交数量
     * @return
     * @param bankCity
     */
    List<ProductDealNumberByCityDTO> selectDealNumber(@Param("bankCity") String bankCity);
}
